The invention relates to methods of image processing, and in particular to image processing using neural networks.
Generally, image pixels are represented by color values, such as RGB or HSV, for correct color display. If a colored image is to be displayed completely, storage of the color values of the colors must be very large. For example, in a true color system, each pixel of the image occupies 24 bits.
However, images may be displayed in certain electronic devices with image processing function, such as game machines, through a chip, such as a video chip. The storage space of the chip is usually limited. Thus, display of image colors completely with limited storage is important for electronic devices.
The mentioned problems can be partially resolved by an indexed image method utilizing a color palette containing colors for image display. Each color is represented by color values, such as RGB. Each pixel corresponds to one color in the color palette. When the images are displayed, the indices are first retrieved and corresponding colors obtained accordingly. The images are displayed according to the obtained colors.
A color palette 10 is shown on the left of FIG. 1, containing N colors, shown as 100, 102, 104, 106. Each color is represented by RGB color values. An image 12 with pixels is shown on the right. Each pixel records an index corresponding to the color palette 10. When image 12 is displayed, the indices are first retrieved. The corresponding color values are then obtained and the image displayed accordingly. In this indexed image method, only one color palette 10 and indices contained in the image 12 need be recorded, partially reducing the storage size.
The indexed image method has some drawbacks. First of all, if the color number of the color palette is too small, the image cannot be displayed properly. If the color number is large, the required storage size of the color palette increases.